<#include "../../select.ftl" />
<!DOCTYPE html>
<html>
<head>
    <title>维护页面</title>
    <script type="text/javascript">
        function popAddOrModify(id) {
            var data = {};
            var url = '${absoluteContextPath}/amb/ambHymxb';
            if (id != undefined) {
                data.id = id;
                url = url + "/goEdit";
            } else {
                url = url + "/goAdd";
            }
            $.ajax({
                url: url,
                type: 'post',
                data: data,
                success: function (data) {
                    var data = JSON.parse(data);
                    if (data.returnCode == 1) {
                        var pop_div = $('#myModal');
                        pop_div.html(data.content.data);
                        pop_div.modal('show');
                    } else {
                        $.showMessage({parentId: "showMessage", message: "数据加载异常！", type: "success"});
                    }
                }
            });
        }

        $(function () {
            $("input[name=billDate]").focus(function () {
                WdatePicker({dateFmt: 'yyyy-MM-dd'});
            })
            $("input[name=openStart]").focus(function () {
                WdatePicker({dateFmt: 'yyyy-MM-dd'});
            })
            $("input[name=openEnd]").focus(function () {
                WdatePicker({dateFmt: 'yyyy-MM-dd'});
            })
            $("input[name=dueStart]").focus(function () {
                WdatePicker({dateFmt: 'yyyy-MM-dd'});
            })
            $("input[name=dueEnd]").focus(function () {
                WdatePicker({dateFmt: 'yyyy-MM-dd'});
            })
            $("input[name=billEnd]").focus(function () {
                WdatePicker({dateFmt: 'yyyy-MM-dd'});
            })
            $("div[class='tooltip fade top in']").hide();
        });

        function refreshTable() {
            $("input[name=currentPage]").val(1);
            $("#search_ambHymxb_table").ajaxSubmit({
                url: '${absoluteContextPath}/amb/ambHymxb/ajaxList',
                success: function (data) {
                    var data = JSON.parse(data);
                    if (data.returnCode == 1) {
                        $("#tableContent").html(data.content.data);
                    } else {
                        $.showMessage({parentId: "showMessage", message: "表格数据加载异常！", type: "success"});
                    }
                }
            });
        }

        function popExportExcel() {
            $("#search_ambHymxb_table").attr('action', '${absoluteContextPath}/amb/ambHymxb/export');
            $("#search_ambHymxb_table").submit();
            $("#search_ambHymxb_table").attr('action', '${absoluteContextPath}/amb/ambHymxb/list');
        }
    </script>
</head>
<body>

<div class="breadcrumbs">
    <ol class="breadcrumb">
        <li><a href="${absoluteContextPath}/home"><i class="fa fa-home"></i>首页</a></li>
        <li><a href="#">阿米巴</a></li>
        <li class="active">会员明细表</li>
    </ol>
</div>

<div class="main">
    <!-- row -->
    <div class="row">
        <div class="col-md-12">
            <section class="tile">
                <!-- tile body -->
                <div class="tile-body">
                    <div id="showMessage"><#include "../../message.ftl" /></div>
                    <div class="form-horizontal">
                        <form id="search_ambHymxb_table" action="${absoluteContextPath}/amb/ambHymxb/list"
                              method="post">
                        <#--<input type="hidden" name="pageSize" value="${ambHymxbsTable.page.pageSize}"/>-->
                            <input type="hidden" name="currentPage" value="${ambHymxbsTable.page.currentPage}"/>
                            <input type="hidden" name="yes" value="${ambHymxbParams.yes!''}"/>


                            <div class="row">

                                <div class="form-group col-md-3">
                                    <label class="col-sm-3 control-label" for="exampleInputEmail2">客户姓名</label>

                                    <div class="col-sm-8">
                                        <input class="form-control" name="customerName"
                                               value="${ambHymxbParams.customerName!''}" placeholder="" type="text">
                                    </div>
                                </div>
                                <div class="form-group col-md-3">
                                    <label class="col-sm-3 control-label" for="exampleInputEmail2">下单日期</label>

                                    <div class="col-sm-8">
                                        <input class="form-control" name="billDate"
                                               value="${ambHymxbParams.billDate!''}" placeholder="" type="text">
                                    </div>
                                </div>
                                <div class="form-group col-md-3">
                                    <label class="col-sm-3 control-label" for="exampleInputEmail2">----</label>

                                    <div class="col-sm-8">
                                        <input class="form-control" name="billEnd" value="${ambHymxbParams.billEnd!''}"
                                               placeholder="" type="text">
                                    </div>
                                </div>
                                <div class="form-group col-md-3">
                                    <label class="col-sm-3 control-label" for="exampleInputEmail2">引荐人</label>

                                    <div class="col-sm-8">
                                        <input class="form-control" name="yjrName" value="${ambHymxbParams.yjrName!''}"
                                               placeholder="" type="text">
                                    </div>
                                </div>

                            </div>
                            <div class="row">

                                <div class="form-group col-md-3">
                                    <label class="col-sm-3 control-label" for="exampleInputEmail2">产品名称</label>

                                    <div class="col-sm-8">
                                        <input class="form-control" name="productName"
                                               value="${ambHymxbParams.productName!''}" placeholder="" type="text">
                                    </div>
                                </div>
                                <div class="form-group col-md-3">
                                    <label class="col-sm-3 control-label" for="exampleInputEmail2">开卡日期</label>

                                    <div class="col-sm-8">
                                        <input class="form-control" name="openStart"
                                               value="${ambHymxbParams.openStart!''}" placeholder="" type="text">
                                    </div>
                                </div>
                                <div class="form-group col-md-3">
                                    <label class="col-sm-3 control-label" for="exampleInputEmail2">----</label>

                                    <div class="col-sm-8">
                                        <input class="form-control" name="openEnd" value="${ambHymxbParams.openEnd!''}"
                                               placeholder="" type="text">
                                    </div>
                                </div>
                                <div class="form-group col-md-3">
                                    <label class="col-sm-3 control-label" for="exampleInputEmail2">促会人</label>

                                    <div class="col-sm-8">
                                        <input class="form-control" name="chrName" value="${ambHymxbParams.chrName!''}"
                                               placeholder="" type="text">
                                    </div>
                                </div>

                            </div>
                            <div class="row">

                                <div class="form-group col-md-3">
                                    <label class="col-sm-3 control-label" for="exampleInputEmail2">渠道</label>

                                    <div class="col-sm-8">
                                        <input class="form-control" name="channel" value="${ambHymxbParams.channel!''}"
                                               placeholder="" type="text">
                                    </div>
                                </div>
                                <div class="form-group col-md-3">
                                    <label class="col-sm-3 control-label" for="exampleInputEmail2">结束日期</label>

                                    <div class="col-sm-8">
                                        <input class="form-control" name="dueStart"
                                               value="${ambHymxbParams.dueStart!''}" placeholder="" type="text">
                                    </div>
                                </div>
                                <div class="form-group col-md-3">
                                    <label class="col-sm-3 control-label" for="exampleInputEmail2">----</label>

                                    <div class="col-sm-8">
                                        <input class="form-control" name="dueEnd" value="${ambHymxbParams.dueEnd!''}"
                                               placeholder="" type="text">
                                    </div>
                                </div>
                                <div class="form-group col-md-3">
                                    <label class="col-sm-3 control-label" for="exampleInputEmail2">分管人</label>

                                    <div class="col-sm-8">
                                        <input class="form-control" name="fgrName" value="${ambHymxbParams.fgrName!''}"
                                               placeholder="" type="text">
                                    </div>
                                </div>
                            </div>

                            <div class="row">
                                <div class="form-group col-md-3">
                                    <label class="col-sm-3 control-label" for="exampleInputEmail2">种类</label>

                                    <div class="col-sm-8">
                                        <input class="form-control" name="species" value="${ambHymxbParams.species!''}"
                                               placeholder="" type="text">
                                    </div>
                                </div>
                                <div class="form-group col-md-3">
                                    <label class="col-sm-3 control-label" for="exampleInputEmail2">卡号</label>

                                    <div class="col-sm-8">
                                        <input class="form-control" name="cardNo" value="${ambHymxbParams.cardNo!''}"
                                               placeholder="" type="text">
                                    </div>
                                </div>
                                <div class="form-group col-md-3">
                                    <label class="col-sm-3 control-label" for="exampleInputEmail2">到期类型</label>

                                    <div class="col-sm-8">
                                    <@select name="overdueType" value="${ambHymxbParams.overdueType!''}" list=overdueTypeList class="form-control"/>
                                    </div>
                                </div>
                                <div class="form-group col-md-3">
                                    <label class="col-sm-3 control-label" for="exampleInputEmail2">是否退会</label>

                                    <div class="col-sm-8">
                                    <@select name="vipBack" value="${ambHymxbParams.vipBack!''}" list=ynTypeList class="form-control"/>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="form-group col-md-3">
                                    <label class="col-sm-3 control-label" for="exampleInputEmail2">显示条数:</label>

                                    <div class="col-sm-8">
                                        <input class="form-control" name="pageSize"
                                               value="${ambHymxbsTable.page.pageSize}" placeholder="" type="text"/>
                                    </div>
                                </div>
                                <div class="form-group col-md-3">
                                    <label class="col-sm-3"></label>

                                    <div class="col-sm-8">
                                        <button type="button" class="btn btn-primary" onclick="refreshTable()">查询
                                        </button>
                                        <button type="reset" class="btn btn-default">重置</button>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </section>
            <section class="tile">
                <div class="tile-header">
                    <h1>
                        <button type="button" class="btn btn-green" onclick="popExportExcel();"><i
                                class="fa fa-plus"></i><span class="margin-left-5">导出</span></button>
                    </h1>
                </div>
                <div class="tile-body nopadding">
                    <div class="table-responsive" id="tableContent">
                    <#include "table.ftl"/>
                    </div>
                </div>
            </section>
        </div>
    </div>
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    </div>
</div>
</body>
</html>
